From : Mike Capp (cm5msmc@bs41.staffs.ac.uk)
Subject : The blit command in asm
#BLTAPTH=$50 : #BLTBPTH=$4C : #BLTCPTH=$48 : #BLTDPTH=$54
#BLTAMOD=$64 : #BLTBMOD=$62 : #BLTCMOD=$60 : #BLTDMOD=$66
#BLTADAT=$74 : #BLTBDAT=$72 : #BLTCDAT=$70
#BLTAFWM=$44 : #BLTALWM=$46
#BLTCON0=$40 : #BLTCON1=$42
#BLTSIZV=$5C : #BLTSIZH=$5E

Statement handblit{sptr.l,x.w,y.w}
  *s.shape=sptr
  *b.bitmap=Addr BitMap(0)
  OwnBlitter_
  ; bitplane loop starts here
  For i=0 To 7
    WaitBlit_
    ; set up blitter channel address pointers
    Poke.l #BLTAPTH,*s\_cookie
    Poke.l #BLTBPTH,*s\_data+(i*4)
    P
oke.l #BLTCPTH,*b\_data[i]
    Poke.l #BLTDPTH,*b\_data[i]
    ; set up blitter channel modulos
    Poke.w #BLTAMOD,*s\_ebwidth
    Poke.w #BLTBMOD,*s\_ebwidth
    Poke.w #BLTCMOD,*b\_linemod
    Poke.w #BLTDMOD,*b\_linemod
    ; set up disabled blitter channel data, not used at present
    Poke.w #BLTADAT,0
    Poke.w #BLTBDAT,0
    Poke.w #BLTCDAT,0
    ; set up firstword and lastword masks for blitter channels
    Poke.w #BLTAFWM,$FFFF
    Poke.w #BLTALWM,$FFFF
    ; set up BLTCON0 as standard minterm, a
ll channels enabled, no shift
    Poke.w #BLTCON0,$0FAC
    ; set up BLTCON1 as no shift, all enable flags clear
    Poke.w #BLTCON1,0
    ; set up BLTSIZV (ECS variant)
    Poke.w #BLTSIZV,*s\_pixheight
    ; set up BLTSIZH (ECS variant) -> start Blitter
    Poke.w #BLTSIZH,*s\_ebwidth/2
  Next i
  DisownBlitter_
End Statement